<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate"/>
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0"/>
<link rel="icon" href="http://dingdian.parllay.cn/dist/images/logo.png" type="image/x-icon"/>
<title>叮当一下活动列表</title>
<!--线上环境-->
<link rel="stylesheet" href="http://md.yuxiaocloud.com/Public/css/dist/business-component-min.css">
<link rel="shortcut icon" href="http://dingdian.parllay.cn/dist/images/logo.png"/>
<link rel="bookmark" href="http://dingdian.parllay.cn/dist/images/logo.png"/>
<link rel="stylesheet" href="http://md.yuxiaocloud.com/Public/plugins/layui/css/layui.css">
<link rel="stylesheet" href="http://md.yuxiaocloud.com/Public/plugins/jbox/jbox-min.css">
<link rel="stylesheet" href="http://md.yuxiaocloud.com/PublicMob/css/dist/style.css">
<link rel="stylesheet" href="http://md.yuxiaocloud.com/Public/plugins/diy/diy-min.css">
<link rel="stylesheet" href="http://md.yuxiaocloud.com/Public/plugins/uploadify/uploadify-min.css">
<link rel="stylesheet" href="http://md.yuxiaocloud.com/Public/plugins/colorpicker/colorpicker.css">
<link rel="stylesheet" href="http://md.yuxiaocloud.com/Public/plugins/spectrum/spectrum.css">
<link rel="stylesheet" href="http://md.yuxiaocloud.com/Public/css/dist/home/Item/lists.css">
<link rel="stylesheet" href="http://md.yuxiaocloud.com/Public/css/dist/home/Item/add_step2.css">
<style>
    .my-suncode .layui-layer-btn>a{
        background-color:#1E9FFF;
        border-color:#1E9FFF;
        color:#fff;
    }
    #albums{z-index:999998;}
    .item_to_merchant_shop_div_back{
        position: fixed;
        top:0;
        left:0;
        width:100%;
        background:rgba(0,0,0,0.6);
        z-index:10;
        display:none;
    }
    .item_to_merchant_shop_div{
        position:absolute;
        top:0;
        left:0;
        bottom:0;
        right:0;
        margin:auto;
        width:66%;
        height:550px;
        background:#fff;
        border-radius:10px;
        color:#666;
        padding-bottom:20px;
        overflow:hidden;
    }
    .back_xian{
        width: 96.5%;
        margin-left: 1.5%;
        margin-top: 10px;
        margin-bottom: 10px;
        border: 1px solid #E7E7E8;
    }
    .back_item_img_div{
        width: 100px;
        height: 100px;
        margin-left: 1.5%;
        padding: 10px;
        border: 1px solid #E7E7E8;
        border-radius: 5px;
        float: left;
    }
    .back_item_info{
        overflow: hidden;
    }
    .back_item_img{
        width: 100%;
        height: 100%;
    }
    .back_item_name{
        margin-top: 15px;
        margin-left: 1.5%;
        margin-bottom: 15px;
        display: block;
    }
    .back_item_price{
        text-align: center;
        width: 15%;
        height: 120px;
        margin-left: 5%;
        float: right;
    }
    .back_item_price_title{
        font-size: 16px;
        margin-top: 20px;
        letter-spacing:2px;
    }
    .back_item_price_input{
        display: inline-block;
        padding: 6px 10px;
        border-radius: 3px;
        line-height: normal;
        font-size: 12px;
        color: #000;
        background: #fff;
        width: 98px;
        border: 1px solid #ccc;
        box-sizing: border-box;
    }
    .moreMini{
        text-align: center;
        width: 30%;
    }
    .fixed_to_shop{
        float: right;
        width: 30%;
        padding: 6px 10px;
        border-radius: 3px;
        line-height: normal;
        font-size: 12px;
        color: #000;
        background: #fff;
        border: 1px solid #ccc;
        box-sizing: border-box;
    }
    .close_item_to_merchant{
        position: absolute;
        top: 10px;
        right: 10px;
        width: 14px;
        height: 14px;
        background: url(http://md.yuxiaocloud.com/Public/plugins/jbox/Images/remove-black.png) no-repeat;
        cursor: pointer;
    }
    .save_item_to_merchant{
        width: 20%;
        margin-left: 40%;
        margin-top: 10px;
        height: 30px;
        cursor: pointer;
    }
    td.sort .gicon-edit:hover{
        cursor:pointer;
    }
    /*郝清振修改样式*/
    .check-sure{ margin-left:300px; position:relative; top:-8px; left:0;}
    .lable{ height:30px; line-height:30px; text-align: center; padding-left:5px; padding-right: 5px; min-width:75px; text-align: left;}
    .toget{ height:30px; line-height:30px; text-align: center; padding-left:5px; padding-right: 5px;}
    .time-input{ width:100px;}
    .lableCase{ width:400px; padding-right: 20px; padding-left:10px; padding-top:5px; padding-bottom:5px; margin-top: 0px; margin-bottom:0px;}
    .margin-r-10{ margin-right:10px;}
    .margin-l-10{ margin-left:10px;}
    .margin-r-20{ margin-right:20px;}
    .margin-l-20{ margin-left:20px;}
    .margin-r-30{ margin-right:30px;}
    .margin-r-60{ margin-right:60px;}
    .icon_check{ display: inline-block;}
    .wxtables td{ padding-top:0px; padding-bottom:0px;}
    .tables-btmctrl{ padding-top:0px;}
    .nextPageCase{ width:300px; margin:0 auto;}
    .tb-tbody td{height:80px; line-height:24px; padding-left:0px; padding-right:0px; text-align: center;}
    .wxtables th {border: 1px solid #eee; color: #333;}
    .wxtables td {border: 1px solid #eee; color: #333;}
    .tb-thead th{padding-top:10px; padding-bottom:10px; height:20px; line-height:20px; text-align:center;}
    .tb-imgCase-case{ width:100px; height:178px;}
    .tb-imgCase-case a{ width:100px; height:178px;}
    .tb-imgCase-case img{ width:100px; height:178px;}
    /*模态框*/
    .maskLayout{width:100%; height:100%; left:0; top:0; position:fixed; z-index:10;}
    .Layouter{background:#000; opacity:0.5; width:100%; height:100%;}
    .maskMotal{width:700px; height:560px; position:absolute; left:50%; top:50%; margin-left:-350px; margin-top:-280px; z-index:10; padding:10px 10px 10px 10px; background:#fff; border-radius:4px; border:1px solid #666;}
    .maskMotalConfirm{width:500px; height:100px; position:absolute; left:50%; top:50%; margin-left:-250px; margin-top:-50px;}
    .icon{color:#fff; line-height:30px; height:30px;}
    .must-icon{visibility:block; color:red; text-align:center; line-height:30px; height:30px;}
    .closeBtn{width:20px; height:20px; position:absolute; right:0; top:0; margin-right: 20px; background:#fff; line-height:20px; text-align: center; margin-top:10px; background:url(static/images/login.jpg) no-repeat center top; border-radius:50% 50%; color:#fff; cursor: color:#fff; cursor:pointer; background:#0d73f9;}
    .closeBtn-icon{}
    .maskMotal-title{padding-bottom:20px; padding-top:10px; font-size:14px; line-height:20px; padding-left:6px;}
    .maskMotal-box{ padding-top:4px; padding-bottom:4px;}
    .isTrask{margin-top:8px; margin-left:10px; width:14px; height:14px;}
    input.jm_file{width:65px; display:block; overflow:hidden;}
    .jm_fileCase{border:1px solid #ccc;}
    .jm_name{width:150px;}
    .jm_fileCase img{ width:100px; height:100px;}
    .input:disabled,.select:disabled,.textarea:disabled {
        background: #fff;
        cursor:default;
    }
    .maskMotal{overflow-y:scroll;}

    /*活动管理*/
    .tb-imgCase{ text-align:center}

</style>
<script type="text/javascript" src="static/js/jquery-1.7.2.js"></script>
<script type="text/javascript" src="static/js/laydate/laydate.js"></script>
<script       src="http://md.yuxiaocloud.com/Public/modulesJs/scroll.js"></script>
<script>
$(function(){
  var storeNo=window.localStorage.getItem("storeNo")||'B02S0002';
  var type=$('#active_select').children('option:selected').attr('type')||2;
  var category=$('#active_select').children('option:selected').attr('category')||1;
  var page=1;
  var size=10;
  //获取活动列表页接口
  creatActiveItem();
  $('#active_select').on('change',function(){
    //alert('123');
    //alert($(this).children('option:').length);
    storeNo=window.localStorage.getItem("storeNo")||'B02S0002';
    type=$(this).children('option:selected').attr('type')||2;
    category=$(this).children('option:selected').attr('category')||1;
    page=1;
    size=10;
    creatActiveItem();
  });
  function creatActiveItem(){
    var param={
      data:{
        "storeNo":storeNo,
        "type":type,
        "category":category,
        "page":page,
        "size":size
        }
      }
    var params=JSON.stringify(param);
    console.log('-----GetActiveItems-params-get---',param,params)
    $.ajax({
       url:'http://dingdian-ppe.parllay.cn/wxserver/storeActivity/getActivity',
       data:params,
       type:'POST',
       async:false,
       contentType:'application/json',
       dataType:'json',
       success:function(res){
          var data=res.data;
          var status=res.status;
          if(status==true){
            console.log('-----GetActiveItems-res-get---',res)
            createActiveList();
            function createActiveList(){
              $('.j_tb-tbody').html('');
              for(var i=0; i<data.length; i++){
                var res='';
                res+='<tr class="goodsItems">'+
                  '<td class="tb-goodName">'+data[i].name+'</td>'+
                  '<td class="tb-imgCase">'+
                    '<div class="tb-imgCase-case">'+
                      '<a href="javascript:;">'+
                        '<img src="'+data[i].imgUrl+'">'+
                      '</a>'+
                    '</div>'+
                  '</td>'+
                  '<td class="tb-prevPrice">'+data[i].id+'</td>'+
                  '<td class="tb-chose">'+
                    '<div class="clearfix chooseCase">'+
                      '<a href="javascript:;" class="j_edit fl btn btn-primary margin-r-10 margin-l-20">详情</a>'+
                      '<a href="javascript:;" class="j_edit fl btn btn-primary margin-r-10 margin-l-20">编辑</a>'+
                      '<a href="javascript:;" class="j_offline fl btn btn-primary">删除</a>'+
                    '</div>'+
                  '</td>'+
                '</tr>';
                $('.j_tb-tbody').append(res);
              }
            }

          }else{

          }
       },
       error:function(res){
          //alert('err');
       }
    });
  }
});
</script>
</head>
<body class="cp-bodybox">
<div class="goodsId" class="j_edit_goodsId"></div>
<div class="container">
<div class="inner clearfix" >
<!-- subBar 开始 -->
<div id="content-left" class="content-left fl">
  <dl class="left-menu shop_1 sub_home">
    <dt>
      <i class="icon-menu cabinet"></i>
      <span id="shop_1" data-id="1">叮店管理</span>
    </dt>
    <dd class="subshop_0">
      <a data-href="/MyStore/setting">店铺管理</a>
    </dd>
  </dl>
  <dl class="left-menu shop_2 sub_home">
    <dt>
      <i class="icon-menu commodity"></i>
      <span id="shop_2" data-id="2">活动管理</span>
    </dt>
    <dd class="subshop_2">
        <a data-href="/Item/shop_items_l">活动</a>
    </dd>
    <dd class="subshop_4 ">
      <a data-href="/Item/list_class"></a>
    </dd>
  </dl>
  <dl class="left-menu shop_6 sub_home">
    <dt>
      <i class="icon-menu signup"></i>
      <span id="shop_6" data-id="6">商品管理</span>
    </dt>
    <dd class="subshop_0">
      <a data-href="/Order/lists">商品列表</a>
    </dd>
    <dd class="subshop_1">
      <a data-href="/Order/customerLists">商品分类</a>
    </dd>
    <dd class="subshop_2">
      <a data-href="/Order/packageLists"></a>
    </dd>
    <dd class="subshop_3">
      <a data-href="/Order/export"></a>
    </dd>
  </dl>
  <dl class="left-menu shop_7 sub_home" style="display:none;">
    <dt>
        <i class="icon-menu "></i>
        <span id="shop_7" data-id="7"></span>
    </dt>
    <dd class="subshop_0 ">
        <a data-href="/BusinessMan/index"></a>
    </dd>
    <dd class="subshop_1 ">
        <a data-href="/RoomManage/index"></a>
    </dd>
  </dl>
  <dl class="left-menu shop_5 sub_home">
    <dt>
        <i class="icon-menu cog"></i>
        <span id="shop_5" data-id="5">设置</span>
    </dt>
    <dd class="subshop_0">
      <a data-href="/System/updatepwd">修改密码</a>
    </dd>
  </dl>
</div>
<!-- subBar 结束-->
<!--右边主体部分 开始-->
<div class="content-right " style="min-height: 1200px;">
    <a href="javascript:;" class="btn-leftMenuFold" id="j-btn-leftMenuFold"></a>
    <div class="clearfix">
      <div class="fl lableCase">
        <h1 class="content-right-title">广告列表</h1>
      </div>
      <div class="fr lableCase">
        <a href="javascript:;" class="btn btn-success j-additem">添加新活动</a>
      </div>
    </div>
    <div class="tables-searchbox newcearchbox clearfix">
        <!-- <input type="text" placeholder="商品名称" id="sr_name" class="input fl" name="title" value=""> -->
        <select name="is_status" id="active_select" class="select fl small newselect" value="">
            <option type=1 category=1 selected>开启海报</option>
            <option type=2 category=1>头部活动</option>
            <option type=2 category=2>折扣商品</option>
            <option type=2 category=3>店长推荐</option>
            <option type=2 category=4>新款上架</option>
        </select>
    </div>
    <div class="tablesWrap j_tableListWrap mgt10">

      <table id="j_tableList" class="wxtables j_tableList">
  		    <thead class="tb-thead j_tb-thead" style="">
  		        <tr class="po_list">
                  <th width="100px;">活动名称</th>
                  <th width="50px;">活动图片</th>
                  <th width="100px;">排序</th>
                  <th width="200px;">操作</th>
  		        </tr>
  		    </thead>
  		    <tbody class="tb-tbody j_tb-tbody">


            <tr class="goodsItems">
              <td class="tb-goodName">格子吊带毛织连衣裙花灰</td>
              <td class="tb-imgCase">
                <div class="tb-imgCase-case">
                  <a href="javascript:;">
                    <img src="http://p1az9gcpw.bkt.clouddn.com/FvKl19Np9mR_DcSZ2fp1ZQOEosIk"/>
                  </a>
                </div>
              </td>
              <td class="tb-prevPrice">6</td>
              <td class="tb-chose">
                <div class="clearfix chooseCase">
                  <a href="javascript:;" class="j_edit fl btn btn-primary margin-r-10 margin-l-20">详情</a>
                  <a href="javascript:;" class="j_edit fl btn btn-primary margin-r-10 margin-l-20">编辑</a>
                  <a href="javascript:;" class="j_offline fl btn btn-primary">删除</a>
                </div>
              </td>
            </tr>


        </tbody>
  		</table>

    </div>
</div>
<!--右边主体 结束-->
</div>
</div>
<!--end container-->
<!--模态框 开始-->
<div class="maskLayout j_maskLayout" style="display:none;">
  <div class="Layouter" style="display:block;"></div>

  <div class="maskMotal" style="display:block;">
    <div class="closeBtn">
      <div class="closeBtn-icon">x</div>
    </div>

    <h3 class="clearfix maskMotal-title"><span class="span">添加新活动</span>（带<i class="icon must-icon"> * </i>的是必填项）</h3>

    <div class="clearfix maskMotal-box">
      <div class="clearfix">
        <div class="fl lableCase">
          <i class="icon must-icon fl">*</i>
          <label for="" class="fl lable">商品名:</label>
          <input type="text" placeholder="" class="jm_name input time-input fl" name="title" value="">
        </div>
      </div>

      <div class="clearfix">
        <div class="fl lableCase">
          <i class="icon must-icon fl">*</i>
          <label for="" class="fl lable">原价:</label>
          <input type="text" placeholder="" class="jm_price input time-input fl" name="title" value="">
          <span class="fl toget">元</span>
        </div>
      </div>

      <div class="clearfix">
        <div class="fl lableCase">
          <i class="icon must-icon fl">*</i>
          <label for="" class="fl lable">是否打折:</label>
          <input type="checkbox" class="jm_isRate jm_isDiscount fl isTrask" name="title" value="">
        </div>
      </div>

      <div class="clearfix">
        <div class="fl lableCase">
          <i class="icon must-icon fl">*</i>
          <label for="" class="fl lable">折扣:</label>
          <input type="number" placeholder="" class="jm_rate jm_discountRate input time-input fl" name="title" value="">
          <span class="fl toget">折</span>
        </div>
      </div>

      <div class="clearfix">
        <div class="fl lableCase">
          <i class="icon fl">*</i>
          <label for="" class="fl lable">折后价:</label>
          <input type="text" class="jm_ratePrice fl input time-input" name="title" value="" disabled>
          <span class="fl toget">元</span>
        </div>
      </div>

      <div class="clearfix">
        <div class="lableCase clearfix">
          <i class="icon must-icon fl">*</i>
          <label for="" class="fl lable">添加图片:</label>
          <div class="imgItem fl fileCase clearfix">
            <input type="file" style="float:none;" class="jm_file"/>
            <span class="icon" style="float:none;">请上传png格式图片</span>
            <div class="j_OnImgCase jm_fileCase" style="width:100px; height:100px; display:block; float:none;">
              <img class="img j-OnImgCase" style="width:100px; height:100px;" src="" alt="">
            </div>
          </div>
        </div>
      </div>

      <div class="clearfix">
        <div class="fl lableCase">
          <i class="icon must-icon fl">*</i>
          <label for="" class="fl lable">是否上架:</label>
          <input type="checkbox" class="jm_isSoldout isTrask fl" name="title" value="">
        </div>
      </div>

      <div class="clearfix">
        <div class="fl lableCase">
          <i class="icon fl">*</i>
          <label for="" class="fl lable">是否设为店长推荐:</label>
          <input type="checkbox" class="jm_isCommend isTrask fl" name="title" value="">
        </div>
      </div>

    </div>
    <div class="fl lableCase check-sure">
      <a href="javascript:;" class="j_sure fl btn btn-primary margin-r-30">保存</a>
      <a href="javascript:;" class="j_cans fl btn btn-primary">取消</a>
    </div>
  </div>
</div>
<!--模态框 结束-->
<!--模态框2 开始-->
<div class="maskLayout j_maskLayoutConfirm" style="display:none;">
  <div class="Layouter" style="display:block;"></div>
  <div class="maskMotal maskMotalConfirm" style="display:block;">
    <div class="closeBtn">
      <div class="closeBtn-icon">x</div>
    </div>
    <h3 class="clearfix maskMotal-title">确认下架吗？</h3>


    <div class="fl lableCase check-sure">
      <a href="javascript:;" class="j_sure_check fl btn btn-primary margin-r-30">确认</a>
      <a href="javascript:;" class="j_cans_check fl btn btn-primary">取消</a>
    </div>
  </div>
</div>
<!--模态框2 结束-->
</body>
</html>
